package com.verisette.ncos.persistence.domain;

import java.io.Serializable;

import javax.persistence.Column;
import javax.persistence.Id;

/**
 * {Description here}
 *
 * @author Thippawan Muangchu (Tip)
 * @since Oct 1, 2010 5:33:52 PM
 * @version 1.0.0
 * @see 
 */
public class CustomMasterUserGroupId implements Serializable {
	
	private static final long serialVersionUID = 4105186177222921044L;

	@Id
	@Column(name="USP_ID")
	private Integer uspId;
	
	@Id
	@Column(name="USG_ID")
	private Integer usgId;

	
	public Integer getUspId() {
		return uspId;
	}

	public void setUspId(Integer uspId) {
		this.uspId = uspId;
	}

	public Integer getUsgId() {
		return usgId;
	}

	public void setUsgId(Integer usgId) {
		this.usgId = usgId;
	}

	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + ((usgId == null) ? 0 : usgId.hashCode());
		result = prime * result + ((uspId == null) ? 0 : uspId.hashCode());
		return result;
	}

	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		CustomMasterUserGroupId other = (CustomMasterUserGroupId) obj;
		if (usgId == null) {
			if (other.usgId != null)
				return false;
		} else if (!usgId.equals(other.usgId))
			return false;
		if (uspId == null) {
			if (other.uspId != null)
				return false;
		} else if (!uspId.equals(other.uspId))
			return false;
		return true;
	}

}
